PreviousNextTracker indexSee it online !

(285/308) 1875 - Mac OS X Support plugin exception with Java 9-ea+157

jEdit 5.3.0
Plugin: Mac OS X Support 1.3
Platform: macOS 10.12.3
Java version: 9-ea+157

Just wanted to give you a little headstart regarding Java 9 bugfixes.

Several exceptions are showing up during startup. Those are all related to com.apple.eawt being unavailable. Unfortunately, the implementation of those classes did also change so starting the JVM with `--add-exports java.desktop/com.apple.eawt=ALL-UNNAMED` option does not fix the problem.

I took the easy way out in my application and got rid of the special OS X handling for now. Starting with Java 9, such support should be handled by http://download.java.net/java/jdk9/docs/api/java/awt/Desktop.html and http://download.java.net/java/jdk9/docs/api/java/awt/desktop/package-summary.html

I'm unaware of any way to support both Java 9 and Java >= 8 at the same time.

java.lang.IllegalAccessException: class macosx.OSXAdapter cannot access class com.apple.eawt.Application (in module java.desktop) because module java.desktop does not export com.apple.eawt to unnamed module @6074967a
at java.base/jdk.internal.reflect.Reflection.throwIllegalAccessException(Unknown Source)
at java.base/jdk.internal.reflect.Reflection.throwIllegalAccessException(Unknown Source)
at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Unknown Source)
at java.base/java.lang.reflect.AccessibleObject.slowCheckMemberAccess(Unknown Source)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at macosx.OSXAdapter.setHandler(OSXAdapter.java:118)
at macosx.OSXAdapter.setQuitHandler(OSXAdapter.java:50)
at macosx.MacOSXPlugin$1.run(MacOSXPlugin.java:67)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue.access$500(Unknown Source)
at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)


Similar exceptions are thrown for other setXyzHandler methods. There are also some NPEs but those seem to have the same root cause.

Submitted huxhorn - 2017-02-24 12:32:30.518000 Assigned
Priority 5 Labels
Status open Group None
Resolution None

Comments